home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 3 / Amiga Format CD03 (1996-07-04)(Future Publishing)(GB)(Track 1 of 6)[!][issue 1996-08].iso / comms / netsoftware / archie38_1.lha / archie-1.4 / pcompat.h < prev    next >
C/C++ Source or Header  |  1995-01-05  |  2KB  |  47 lines

  1. /*
  2.  * Copyright (c) 1989, 1990 by the University of Washington
  3.  *
  4.  * For copying and distribution information, please see the file
  5.  * <copyright.h>.
  6.  */
  7.  
  8. #include "copyright.h"
  9.  
  10. /* 
  11.  * pcompat.h - Definitions for compatability library
  12.  *
  13.  * This file contains the defintions used by the compatability
  14.  * library.  Among the definitions are the possible values for
  15.  * pfs_disable_flag.  This file also contains the external 
  16.  * declaration of that variable.  Note, however that the 
  17.  * the module pfs_disable_flag.o is included in libpfs.a
  18.  * because some of the routines in that library set it.
  19.  * The only place it is checked, however, is in pfs_access, 
  20.  * found in libpcompat.a
  21.  *
  22.  */
  23.  
  24. extern    int        pfs_default;
  25. extern    int        pfs_enable;
  26.  
  27. /* Definitions for values of pfs_enable */
  28. #define PMAP_DISABLE      0
  29. #define PMAP_ENABLE       1
  30. #define PMAP_COLON      2
  31. #define PMAP_ATSIGN_NF      3
  32. #define PMAP_ATSIGN      4
  33.  
  34. #define DISABLE_PFS(stmt) do {int DpfStmp; DpfStmp = pfs_enable;\
  35.                pfs_enable = PMAP_DISABLE; \
  36.                stmt; \
  37.                pfs_enable = DpfStmp;} while (0)
  38.  
  39. /* Definitions for PFS_ACCESS */
  40. #define PFA_MAP           0  /* Map the file name only                       */
  41. #define PFA_CREATE        1  /* Create file if not found                     */
  42. #define PFA_CRMAP         2  /* Map file name.  Map to new name if not found */
  43. #define PFA_RO            4  /* Access to file is read only                  */
  44.  
  45. #define check_pfs_default() \
  46.     do { if (pfs_default == -1) get_pfs_default(); } while (0)
  47.